Here we have already a one model "Editmodel". Code is as follows:
<divclass="modal fade"id="Editmodal"tabindex="-1"role="dialog"aria- labelledby="modalLabel"aria-hidden="true"> <divclass="modal-dialog"> <divclass="modal-content"> <divclass="modal-header"style="background-color: #ccc;"> <buttontype="button"class="close"data-dismiss="modal"><spanaria-hidden="true">×</span><spanclass="sr-only">Close</span></button> <h3class="modal-title"id="lineModalLabel2">Edit Records</h3> </div> <divclass="modal-body"id="alertcontent2"> <divstyle="padding-top: 30px"class="panel-body"> <divclass="divList"> <pclass="divHead">Edit Student</p> <table> <tr> <tdstyle="padding-right: 10px;"><b>First Name</b></td> <tdstyle="padding-right: 15px;"> <inputtype="text"class="form-control"ng-model="FirstName"/> </td> </tr> <tr> <tdstyle="padding-right: 10px;"><b>Last Name</b></td> <tdstyle="padding-right: 15px;"> <inputtype="text"class="form-control"ng-model="LastName"/> </td> </tr> <tr> <tdstyle="padding-right: 10px;"><b>Enrollment Date</b></td> <tdstyle="padding-right: 20px;"> <inputtype="text"class="form-control"ng-model="EnrollmentDate"/> </td> </tr> <tr> <tdcolspan="8"style="padding-top: 20px; text-align: right;"> <inputtype="button"class="btnAdd btn btn-primary"value="Save"ng-click="AddUpdateStudent()"/> </td> </tr> </table> </div> </div> </div> </div> </div> </div> </div> </div> If we want to hide the above model"Edit Model". Now we add one extra line code for hiding the model with creating a Close Button : <inputtype="button"class="btnAdd btn btn-primary"data-dismiss="modal"value="Close"ng- click="Close()"/>
Output:
When we Click Close Button, this model is hide.
Liked By
Write Answer
How to hide model in Angular JS
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy
Join MindStick Community
You have need login or register for voting of answers or question.
Manoj Bhatt
23-Feb-2016